<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            perspective: 600px;
            transform-style: preserve-3d;
        }
        .yi{
            width: 130px;
            height: 50px;
            text-align: center;
            background-color: #74ADAA;
            margin: 25px auto;
            position: relative;
            transition: all 1s;
            transform-style: preserve-3d;
        }
        .h{
            width: 130px;
            height: 30px;
            background-color: #74ADAA;
            position: absolute;
            top: 40px;
            transform: rotate3d(1,0,0,90deg) translatey(90px);
        }
        .yi:hover{
            transform: rotate3d(1,0,0,90deg);
        }
        .h2{
            background-color: #74ADAA;
            width: 130px;
            height: 30px;
            transform: translateZ(25px);
            position: absolute;
            top: 32px;
        }
    </style>
</head>
<body>
<div class="yi">
    <div class="h2">H</div>
    <div class="h">H</div></div>
<div class="yi">S</div>
<div class="yi">P</div>
<div class="yi">A</div>
<div class="yi">C</div>
<div class="yi">B</div>
<div class="yi">SO</div>
</body>
</html>